import request from '@/utils/request'

// 查询共享列表
export function listOrdershare(query) {
  return request({
    url: '/zyx/ordershare/list',
    method: 'get',
    params: query
  })
}

// 查询共享给我的派工列表
export function listMyOrdershare(query) {
  return request({
    url: '/zyx/ordershare/listMyOrdershare',
    method: 'get',
    params: query
  })
}

// 查询共享详细
export function getOrdershare(id) {
  return request({
    url: '/zyx/ordershare/' + id,
    method: 'get'
  })
}

// 新增共享
export function addOrdershare(data) {
  return request({
    url: '/zyx/ordershare',
    method: 'post',
    data: data
  })
}

// 修改共享
export function updateOrdershare(data) {
  return request({
    url: '/zyx/ordershare',
    method: 'put',
    data: data
  })
}

// 删除共享
export function delOrdershare(id) {
  return request({
    url: '/zyx/ordershare/' + id,
    method: 'delete'
  })
}

// 导出共享
export function exportOrdershare(query) {
  return request({
    url: '/zyx/ordershare/export',
    method: 'get',
    params: query
  })
}